package ls.jpa.chapter6.dao.impl;

import ls.jpa.chapter6.entity.UserInfo;
import org.apache.log4j.Logger;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * @author Barudisshu
 */
public class UserInfoDaoImpl {

    private static final Logger logger = Logger.getLogger(UserInfoDaoImpl.class);

    @PersistenceContext
    private EntityManager entityManager;

    public UserInfo saveWithOption(UserInfo userInfo) {
        entityManager.persist(userInfo);
        return userInfo;
    }
}
